package cn.kill.stockservice.service;

import cn.jbit.entity.User;
import cn.jbit.utils.ResResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 源码学院只为培养优秀的bat程序员而生
 *
 * @author 学员张在成
 * @data 2021/6/2
 */
public interface StockService {

        //设置key
        void  saveStock();

        //扣减库存
        void  delStock();

        //扣减库存
        void  delStockRedssion();

        //加锁
        String  lock(String key,String value);


        //解锁
        void  unLock();

        //库存服务
        @RequestMapping("/getUser")
        ResResult<User>  loadUserByUsername(@RequestParam("username") String username);




}
